﻿using Dapper;
using System;
using BCEntity.Common.Business.WebsiteBusinessIntroduction;
using System.Collections.Generic;
using System.Data;
using System.Text;
using System.Threading.Tasks;

namespace BCData.Common.Business.WebsiteBusinessIntroduction
{
    /// <summary>
    /// 官网业务简介
    /// </summary>
    public interface IWebsiteBusinessIntroductionData
    {
        #region  成员方法
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        /// <param name="websiteBusinessIntroductionId">官网业务简介Id</param>
        Task<bool> Exists(int websiteBusinessIntroductionId);
        /// <summary>
        /// 增加官网业务简介
        /// </summary>
        /// <param name="entity">官网业务简介信息</param>
        Task<WebsiteBusinessIntroductionEntity> Add(WebsiteBusinessIntroductionEntity entity);
        /// <summary>
        /// 更新官网业务简介
        /// </summary>
        /// <param name="entity">官网业务简介信息</param>
        Task<WebsiteBusinessIntroductionEntity> Update(WebsiteBusinessIntroductionEntity entity);
        /// <summary>
        /// 删除官网业务简介
        /// </summary>
        /// <param name="websiteBusinessIntroductionId">官网业务简介Id</param>
        Task<bool> Delete(int websiteBusinessIntroductionId);
        /// <summary>
        /// 获取官网业务简介
        /// </summary>
        /// <param name="websiteBusinessIntroductionId">官网业务简介Id</param>
        Task<WebsiteBusinessIntroductionEntity> GetEntity(int websiteBusinessIntroductionId);
        /// <summary>
        /// 获取官网业务简介列表
        /// </summary>
        /// <param name="businessCategoryId">业务分类Id</param>
        Task<IEnumerable<WebsiteBusinessIntroductionEntity>> GetList(int? businessCategoryId);
        /// <summary>
        /// 获取官网业务简介分页列表
        /// </summary>
        /// <param name="businessCategoryId">业务分类Id</param>
        /// <param name="tagcode">业务标记码</param>
        /// <param name="itemName">简介项</param>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="sortName">排序字段</param>
        /// <param name="ascending">升序</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">每页数据条数</param>
        Task<(IEnumerable<WebsiteBusinessIntroductionEntity>, int)> Query(string tagcode, int? businessCategoryId,string itemName,DateTime? start, DateTime? end, string sortName, bool? ascending, int pageIndex, int pageSize);
        /// <summary>
		/// 启用官网业务简介
		/// </summary>
		/// <param name="websiteBusinessIntroductionId">官网业务简介Id</param>
		Task<bool> Enabled(int websiteBusinessIntroductionId);
        /// <summary>
        /// 禁用官网业务简介
        /// </summary>
        /// <param name="websiteBusinessIntroductionId">官网业务简介Id</param>
        Task<bool> Disabled(int websiteBusinessIntroductionId);
        #endregion  成员方法
    }


}